package com.totoro.domain;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.totoro.domain.key.NoticeRoleKey;

/**
 * NoticeRole实体关联类
 */
@Entity
@Table(name = "notice_role")
@IdClass(value = NoticeRoleKey.class)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class NoticeRole extends BaseDomain {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	private Role role;// 角色
	@Id
	private Notice notice;// 通知

	// 构造空构造器
	public NoticeRole() {
	}

	// 带参数的构造器
	public NoticeRole(Role role, Notice notice) {
		super();
		this.role = role;
		this.notice = notice;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Notice getNotice() {
		return notice;
	}

	public void setNotice(Notice notice) {
		this.notice = notice;
	}

}